import Vue from 'vue'
import Router from 'vue-router'
import Login from '../components/login/login.vue'
import Home from '../components/home/home.vue'
import Users from '../components/users/users.vue'
import Right from '../components/rights/right.vue'
import Role from '../components/rights/role.vue'
import Goodslist from '../components/goods/goodslist.vue'
import Goodsadd from '../components/goods/goodsadd.vue'
import Goodscate from '../components/goods/goodscate.vue'
import Order from '../components/order/order.vue'
import Reports from '../components/reports/reports.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      name:'login',
      path: '/',
      component:Login
    },
    {
        name:'home',
        path: '/',
        component:Home,
        children:[{
            name:'users',
            path:'users',
            component:Users
        },
        {
            name:'right',
            path:'/rights',
            component:Right
        },
        {
            name:'role',
            path:'/role',
            component:Role
        },
        {
            name:'goodslist',
            path:'/goodslist',
            component:Goodslist
        },{
            name:'goodsadd',
            path:'/goodsadd',
            component:Goodsadd
        },{
            name:'goodscate',
            path:'/goodscate',
            component:Goodscate
        },{
            name:'order',
            path:'/order',
            component:Order
        },{
            name:'reports',
            path:'/reports',
            component:Reports
        },
        ]
    }
  ]
})
